package mysql

import "gorm.io/gorm"

type Notice struct {
	gorm.Model
	NoticeStatus int    `gorm:"type:int(10);not null;comment:'通知类型： 1:系统通知 2:活动通知'"`
	Client       int    `gorm:"type:int(10);not null;comment:'客户端 1:外卖App 2:商家App 3:骑手App'"`
	Title        string `gorm:"type:varchar(100);not null;comment:'通知标题'"`
	Content      string `gorm:"type:varchar(255);not null;comment:'通知内容'"`
	Connect      string `gorm:"type:varchar(255);not null;comment:'跳转链接'"`
	Image        string `gorm:"type:varchar(100);not null;comment:'封面展示'"`
}

func NoticeCreate(notice *Notice) error {
	return DB.Debug().Create(&notice).Error
}
